import matplotlib.pyplot as plt


years = [2013, 2014, 2015, 2016, 2017, 2018, 2019]
g_women = [35225, 79465, 98440, 103636, 129637, 141481, 133022]
# g_zhanbi = []
z_women = [0, 0, 0, 0, 25113, 59533, 52497]
# z_zhanbi = [0, 0, 0 , 0, 65.49, 64.83, 65.39]

plt.rc('font', family='SimSun')

plt.figure(figsize=(16, 10))
plt.plot(years, g_women, label='公需课', linewidth=1, color='red', marker='o', linestyle='--')
plt.plot(years, z_women, label='专业课', linewidth=1, color='blue', marker='^')

plt.legend()

# 设置横纵做表以及标题、字体大小
plt.title('内蒙专技2013-2019年公需课-专业课女性学习人数', fontproperties="SimSun", fontsize=24)
plt.xlabel('学习年份', fontproperties="SimSun", fontsize=18)
plt.ylabel('女性学习人数', fontproperties="SimSun", fontsize=18)
# 设置刻度
plt.tick_params(axis='both', labelsize=14)

# 设置标签数字
for year, count in zip(years, g_women):
    plt.text(year, count, count, ha='center', va='bottom', fontsize=14)

for year, count in zip(years, z_women):
    plt.text(year, count, count, ha='center', va='bottom', fontsize=14)

plt.grid(True)

plt.savefig('./images/内蒙专技2013-2019年女性学习人数.png')

plt.show()